<?php

namespace Php\Queue;

/**
 * redis 链接配置
 */
class RedisConfig
{
	/**
	 * 地址
	 *
	 * @var string
	 */
	private  $host = '';
	
	/**
	 * 端口
	 *
	 * @var string
	 */
	private  $port = '6379';
	
	/**
	 * 密码
	 *
	 * @var string
	 */
	private  $auth = '';
	
	/**
	 * 数据库
	 *
	 * @var int
	 */
	private  $select = 0;
	
	/**
	 * 最大连接数swoole官方连接池默认64
	 *
	 * @var int
	 */
	private  $maxResources = 64;
	
	public function getMaxResources(): int
	{
		return $this->maxResources;
	}
	
	public function setMaxResources(int $num): self
	{
		$this->maxResources = $num;
		return $this;
	}
	
	public function getHost(): string
	{
		return $this->host;
	}
	
	public function setHost($host): self
	{
		$this->host = $host;
		return $this;
	}
	
	public function getPort(): string
	{
		return $this->port;
	}
	
	public function setPort($port): self
	{
		$this->port = $port;
		return $this;
	}
	
	public function getAuth(): string
	{
		return $this->auth;
	}
	
	public function setAuth($auth): self
	{
		$this->auth = $auth;
		return $this;
	}
	
	public function getSelect(): int
	{
		return $this->select;
	}
	
	public function setSelect($select): self
	{
		$this->select = $select;
		return $this;
	}
}